{% extends "layout.html" %}
{% load filters %}

{% block title %}SIPs{% endblock %}
{% block h1 %}SIPs{% endblock %}
{% block page_id %}sips{% endblock %}

{% block js %}
  <script type="text/javascript">

    $(document).ready(function()
      {

      });

  </script>
  <style type="text/css">
  

  </style>
{% endblock %}

{% block content %}

    <h2>
      Job {{ job.jobuuid }}<br />
      SIP {{ job.sipuuid }}
    </h2>
    <p>
      {{ job.currentstep|map_known_values }}<br />
      <strong>Micro-Service:</strong> {{ job.jobtype|map_known_values }}<br />
    </p>
    
    <hr />
    
    <p>Contents of <a href="{% url main.views.show_dir job.jobuuid %}">{{ job.directory }}</a></p>

    {% if parent %}
    <h3>{{ parent }}</h3>
    {% endif %}

    <ul>
      {% for item in list %}
        {% if item|is_dir:job.directory %}
          {% ifnotequal item '.svn' %}
            <li><a href="{% url main.views.show_subdir job.jobuuid item %}">{{ item }}/</a></li>
          {% endifnotequal %}
        {% else %}
          <li><a href="{% url main.views.show_subdir job.jobuuid subdir|join_path:item %}">{{ item }}</a></li>
        {% endif %}
      {% empty %}
        Empty.
      {% endfor %}
    </ul>

{% endblock %}
